
begintalkscript;

variables;

begintalknode 10;
	state = -1;
	nextstate = 10;
	question = "Father Richardson";
	text1 = "The first thing you notice about this man is his age. He's clearly very, very old, and he has the sort of washed-out look that you're used to seeing among elderly mages. Mages who used magic to extend their lives.";
	text2 = "Still, when he greets you, you hear enough warmth in his voice to convince you that he's nowhere near death's door.";
	text3 = "_Greetings, friends. I trust that you all want to know exactly why I've brought you here._";
	text4 = "_Greetings, friend. I trust that you want to know exactly why I've brought you here._";
	text5 = "Father Richardson patiently waits for you to speak.";
	action = INTRO;
	code = 
		if(party_size() == 1) {
			remove_string(3);
		}
		else {
		remove_string(4);
	}
	break;
begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = (party_size() != 1) && (get_flag(1,4) == 0);
	question = "What do you need us to do?";
	text1 = "The elderly priest clears his throat. _The Cathedral of Winds has recently developed a pest problem... one that has resisted our best attempts at exterminating it._";
	text2 = "_Specifically, an uncomfortably large group of angry spirits has arisen from the bodies buried in the catacombs, and we need you to send them to their eternal rest. And the sooner, the better._";
	text3 = "_Now, I think you should go speak to Felix. He's down in the catacombs, and he'll tell you exactly what you'll be doing down there._";
	code = 
		set_flag(1,4,1);
		toggle_quest(1,0);
		toggle_quest(3,1);
	break;
begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = (party_size() == 1) && (get_flag(1,4) == 0);
	question = "What do you need me to do?";
	text1 = "The elderly priest clears his throat. _The Cathedral of Winds has recently developed a pest problem... one that has resisted our best attempts at exterminating it._";
	text2 = "_Specifically, an uncomfortably large group of angry spirits has arisen from the bodies buried in the catacombs, and we need you to send them to their eternal rest. And the sooner, the better._";
	text3 = "_Now, I think you should go speak to Felix. He's down in the catacombs, and he'll tell you exactly what you'll be doing down there._";
	code = 
		set_flag(1,4,1);
		toggle_quest(1,0);
		toggle_quest(3,1);
	break;
begintalknode 13;
	state = 10;
	nextstate = 11;
	condition = get_flag(1,4) == 1;
	question = "You're a priest. Why can't you handle all of this yourself?";
	text1 = "Father Richardson attempts to stand, but falls back into his chair after a brief struggle. _I am old, as you can see. All the holy magic in Relonar cannot return the vitality I once had. And yet, even if I were younger, I could not defeat these spirits._";
	text2 = "_You see, they are older than anyone in this cathedral. While many spirits fade away over time, it seems that these have only grown stronger, to the point where I can no longer be of much aid in controlling them._";

begintalknode 14;
	state = 11;
	nextstate = 12;
	question = "But surely there are other younger priests here. Can't they help?";
	text1 = "_We have tried, believe me. Brother Silas has not recovered from our first attempt, and it will likely be some time before we figure out exactly what is wrong with him._";
	text2 = "The elderly priest sighs. _The others do not have the experience, and I do not have the strength. So, we have turned to you for help._";

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = get_flag(1,4) > 0;
	question = "What makes these spirits so special?";
	text1 = "_Well, first and foremost they are angry. I'm not exactly sure why they're angry, but they are. It's strange, as the bodies they once inhabited were cared for and given a proper burial in the catacombs._";
	text2 = "_In any event, the spirits themselves are unwilling to disclose their motives to us. Perhaps you will have more success than us. We have yet to get close enough to them to learn much else._";

begintalknode 16;
	state = 12;
	nextstate = -1;
	condition = get_flag(1,7) == 0;
	question = "Where is Brother Silas now?";
	text1 = "_The last time I saw him, he was cowering in one of the meditation cells upstairs. He has not spoken to anyone in days, and he has barely eaten anything._";
	text2 = "He solemnly shakes his head. _It is clear that our healing was not enough to save his mind, so he will be sent to the mages in Barton to see if they can devise a cure. Or, at the very least, if they can tell us what happened to him._";
	code = 
		if(get_flag(1,7) == 0)
			set_flag(1,7,1);
	break;
begintalknode 17;
	state = 10;
	nextstate = 13;
	condition = (get_flag(1,4) > 0) && (party_size() == 1);
	question = "Can you give me any help?";
	text1 = "_Well, I'm afraid you must do the bulk of the work here, but I may be able to aid you with a few spells. I can teach them to you if you wish, though I must charge a nominal fee._";
	text2 = "_Also, should the task prove to be too much for you, you may return to me for healing at any time. For that, I ask a modest price of 200 coins, since you are doing us all a favor._";
	text3 = "_As I told you before, I can teach you spells, or I can heal you for 200 coins. Is either necessary?_";
	code = 
		if(get_flag(1,6) != 0) {
			remove_string(1);
			remove_string(2);
		}
		else {
		remove_string(3);
		set_flag(1,6,1);
	}
	break;
begintalknode 18;
	state = 10;
	nextstate = -1;
	condition = (get_flag(1,4) > 0) && (get_flag(1,5) == 0) && (get_flag(8,0) == 0);
	question = "Where are the catacombs?";
	text1 = "Father Richardson laughs, a slightly discomforting sight. It looks more like uncontrolled wheezing.";
	text2 = "_Under the cathedral, of course. But I assume you mean the entrance. It's just on the other side of that wall,_ he says, pointing to the west wall.";
	code = 
		set_flag(1,5,1);
	break;
begintalknode 19;
	state = 10;
	nextstate = 13;
	condition = (get_flag(1,4) > 0) && (party_size() != 1);
	question = "Can you give us any help?";
	text1 = "_Well, I'm afraid you must do the bulk of the work here, but I may be able to aid you with a few spells. I can teach them to you if you wish, though I must charge a nominal fee._";
	text2 = "_Also, should the task prove to be too much for you, you may return to me for healing at any time. For that, I ask a modest price of 200 coins per person, since you are doing us all a favor._";
	text3 = "_As I told you before, I can teach you spells, or I can heal you for 200 coins. Is either necessary?_";
	code = 
		if(get_flag(1,6) != 0) {
			remove_string(1);
			remove_string(2);
		}
		else {
		remove_string(3);
		set_flag(1,6,1);
	}
	break;
begintalknode 20;
	state = 13;
	nextstate = -1;
	question = "What spells can you teach?";
	text1 = "Father Richardson explains the spells he can teach, and soon you finish shopping.";
	text2 = "_Anything else?_";
	code = 
		begin_shop_mode("Father Richardson's Spells","Father Richardson offers to teach you a decent variety of spells, at prices you're not used to seeing.",8,1,-1);
	break;
begintalknode 21;
	state = 13;
	nextstate = -1;
	question = "How about some healing? (200 coins)";
	text1 = "Father Richardson sighs. _Well, I am glad that you do not need it. Perhaps it will make your job easier._";
	text3 = "Father Richardson waves his arms, and you feel a wave of holy energy wash over you, healing you.";
	text4 = "_There, I hope that is enough to sustain you._";
	text5 = "Father Richardson sighs. _I cannot heal you for free._";
	code = 
		if(coins_amount() < 200) {
			clear_strings();
			add_string(5);
		}
		else {
		run_select_a_pc(1);
		if(get_selected_pc() == -1) {
			clear_strings();
			add_string(1);
		}
		else {
		play_sound(24);
		clear_strings();
		add_string(3);
		add_string(4);
		restore_pc(get_selected_pc());
		change_coins(-200);
	}
}
	break;

begintalknode 22;
	state = 13;
	nextstate = 10;
	question = "No thanks, that's it for now.";
	text1 = "_Very well. Is there anything else you wish to talk about?_";

begintalknode 23;
	state = 10;
	nextstate = 14;
	condition = (get_flag(1,4) > 0) && (party_size() == 1);
	question = "Tell me about your faith.";
	text1 = "Father Richardson sighs. _Honestly? Hardly any of the adventurers that come through here really care about our faith, and right now I'd rather just tell you to get on with your work. But, our church did not last this long by turning away the curious._";
	text2 = "_This is the Cathedral of Winds, and myself and the other priests here in Relonar form the Church of the Four Winds. We worship the supreme power of the winds: North, East, South, and West._";
	text3 = "_What else do you wish to know?_";
	text4 = "_I believe I have taught you as much as is necessary right now, and I think it would benefit all of us if you would get on with your quest._";
	code = 
		if(get_flag(1,8) != 0) {
			remove_string(1);
			remove_string(2);
			if(get_flag(1,8) < 3)
				remove_string(4);
			else if(get_flag(1,8) == 3) {
			remove_string(3);
			set_flag(1,8,4);
		}
	}
	else {
	remove_string(3);
	remove_string(4);
	set_flag(1,8,1);
}
	break;
begintalknode 24;
	state = 10;
	nextstate = 14;
	condition = (get_flag(1,4) > 0) && (party_size() != 1);
	question = "Tell us about your faith.";
	text1 = "Father Richardson sighs. _Honestly? Hardly any of the adventurers that come through here really care about our faith, and right now I'd rather just tell you to get on with your work. But, our church did not last this long by turning away the curious._";
	text2 = "_This is the Cathedral of Winds, and myself and the other priests here in Relonar form the Church of the Four Winds. We worship the supreme power of the winds: North, East, South, and West._";
	text3 = "_What else do you wish to know?_";
	text4 = "_I believe I have taught you as much as is necessary right now, and I think it would benefit all of us if you would get on with your quest._";
	code = 
		if(get_flag(1,8) != 0) {
			remove_string(1);
			remove_string(2);
			if(get_flag(1,8) < 3)
				remove_string(4);
			else if(get_flag(1,8) == 3) {
			remove_string(3);
			set_flag(1,8,4);
		}
	}
	else {
	remove_string(3);
	remove_string(4);
	set_flag(1,8,1);
}
	break;
begintalknode 25;
	state = 14;
	nextstate = -1;
	condition = get_flag(1,9) == 0;
	question = "Why do you worship the winds?";
	text1 = "_Because we believe in the unstoppable power of the winds, of course! Each wind brings us different gifts and challenges, and together they balance out to perfect harmony._";
	text2 = "_The winds are unpredictable, just as much as any of the other entities you see worshipped everywhere. They shape our world in ways we cannot even begin to comprehend. And thus, we feel they are worthy of our worship._";
	code = 
		set_flag(1,9,1);
		inc_flag(1,8,1);
	break;
begintalknode 26;
	state = 14;
	nextstate = -1;
	condition = get_flag(1,10) == 0;
	question = "Are there more cathedrals like this around here?";
	text1 = "_This is the only cathedral of this size in Relonar. Others exist, though most of the truly impressive ones are in Pralgad. Compared to those mighty spires, this cathedral is quite humble indeed._";
	text2 = "_Most of the other priests who follow the Church of the Winds are scattered about the province, teaching out of smaller shrines and temples. This is our stronghold._";
	code = 
		set_flag(1,10,1);
		inc_flag(1,8,1);
	break;
begintalknode 27;
	state = 10;
	nextstate = -1;
	condition = (get_flag(50,0) == 1) && (get_flag(1,4) == 1);
	question = "The ghosts are loose. What now?";
	text1 = "Father Richardson sighs. _I know. I can feel their presence outside of the sanctuary. That is why everyone is here. The energy of the altars shelters us from the ghosts' mental assaults, and I am able to repel some of their energy._";
	text2 = "_It seems that the wards are slowly failing, both those in the stonework of the building itself and the machinery installed by the Empire. What we need you to do is repair them, and Felix can tell you how to go about that._";
	text3 = "_Do be careful, though. The spirits of those soldiers are clearly willing to go to any length to escape._";
	code = 
		set_flag(1,4,2);
		toggle_quest(6,1);
	break;
begintalknode 40;
	state = -1;
	nextstate = 40;
	question = "Alyse";
	text1 = "A priestess is quietly kneeling here, but unlike many of the religious types you've burst in on, she actually notices your presence. She doesn't seem all that friendly, though.";
	text2 = "_I am Alyse, and I am responsible for tending the altars here. Why are you here?_";
	text5 = "Alyse quietly kneels before the altar, occasionally casting a hard glance at you.";
	text6 = "_Well, what do you have to say?_";
	action = INTRO;

begintalknode 41;
	state = 40;
	nextstate = 41;
	question = "Why are you praying?";
	text1 = "Alyse nods in the general direction of the altar.";
	text2 = "_I'm praying for this cathedral. Praying so that it may be cleansed and made ready for the people of Relonar to come and hear the gospel of the winds. That is the only way they may be saved._";

begintalknode 42;
	state = 41;
	nextstate = -1;
	condition = get_flag(1,15) == 0;
	question = "Are you worried about the ghosts?";
	text1 = "_Not in the least. As the north wind watches over us, so shall we be spared. Clearly, the north wind has chosen you to act as his guiding hand._";
	text2 = "_And as for our temporary confinement within the sanctuary, I am certain that this is only to protect us. The winds would not want us to be injured while you complete their task._";
	text3 = "You consider telling her that you were hired for this job, and that she should probably be afraid of the ghosts. Thankfully, you have more important work to be doing, so you refrain.";
	text4 = "_I was never worried about the ghosts. And soon, everything will return to normal. And as for you, I am fairly certain that we will be better off without you around._";
	text5 = "_I was never worried about the ghosts, and now they're gone, for better or worse. Soon everything will return to normal, and as for you, I am fairly certain that we will be better off without you._";
	text6 = "For a moment, you actually consider telling her how useless she is in the grand scheme of things, given the fact that adventurers tend to solve most of the major problems that face the Empire's citizens. However, you calm down and refrain.";
	code = 
		set_flag(1,15,1);
		if(get_flag(50,0) == 0)
			remove_string(2);
		if(get_flag(50,1) == 0) {
			remove_string(4);
			remove_string(5);
			remove_string(6);
		}
		else {
		clear_strings();
		add_string(6);
		if(get_flag(50,1) == 1)
			add_string(4);
		else
		add_string(5);
		
	}
	break;
begintalknode 43;
	state = 40;
	nextstate = 42;
	condition = get_flag(50,0) == 0;
	question = "Does this altar get a lot of use?";
	text1 = "_Well, most of the other priests prefer to use the altars in the sanctuary, but I like this one. That, and nobody else seems inclined to maintain it, not even Ethan. So, I do my duty to the winds and keep it clean._";
	text2 = "She sneers. _Whenever the common folk use it, they track in dirt. I even heard one swear in here. It's disgraceful._";
	code = 
		if(get_flag(1,17) == 0)
			set_flag(1,17,1);
	break;
begintalknode 44;
	state = 42;
	nextstate = -1;
	condition = get_flag(1,14) == 1;
	question = "Wait, isn't this supposed to be a public altar?";
	text1 = "Alyse frowns. _Well, if they don't start taking better care of it, then it won't be public for much longer._";
	text2 = "Huh. What a terribly unpleasant person.";
	code = 
		set_flag(1,14,2);
	break;
begintalknode 45;
	state = 40;
	nextstate = -1;
	condition = party_size() != 1;
	question = "Can you help us at all?";
	text1 = "_Well, I'm not allowed to teach magic, and I'm too busy seeking inner harmony to heal you, so no, not really._";
	text2 = "She resumes praying.";

begintalknode 46;
	state = 40;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Can you help me at all?";
	text1 = "_Well, I'm not allowed to teach magic, and I'm too busy seeking inner harmony to heal you, so no, not really._";
	text2 = "She resumes praying.";

begintalknode 47;
	state = 42;
	nextstate = -1;
	condition = get_flag(1,17) == 2;
	question = "Ethan says he doesn't clean this altar just to mess with you.";
	text1 = "Alyse just stares at you for a while.";
	text2 = "_I'm going to ignore that comment, because something like that clearly isn't true. Because if it was true, I'd have to go seek a lengthy and painful bit of vengeance, and I don't have the energy for that right now._";
	code = 
		set_flag(1,17,3);
	break;
begintalknode 48;
	state = 41;
	nextstate = -1;
	condition = get_flag(1,20) == 0;
	question = "Do the people of Relonar really need saving?";
	text1 = "Alyse snorts. _Of course they do! They live in sin without even knowing it! By failing to bend for the mighty power of the winds, they can only be blown away when the winds of change choose to reshape life on this earth!_";
	text2 = "She continues in this vein for quite some time, ranting about salvation and damnation. None of it really registers with you, since you've heard this type of garbage many times before.";
	text3 = "You sincerely hope that not all of the cathedral's priests are this reactionary.";
	code = 
		set_flag(1,20,1);
	break;
begintalknode 49;
	state = -1;
	nextstate = 40;
	question = "Alyse";
	text1 = "A priestess is quietly kneeling here, but unlike many of the religious types you've burst in on, she actually notices your presence. She doesn't seem all that friendly, though.";
	text2 = "_I am Alyse, and I am responsible for tending the altars here. What brings you here?_";
	text5 = "You find Alyse kneeling in a pew, looking just as serenely hostile as before. She doesn't seem all that shaken up, but then again, you wouldn't expect her to be.";
	text6 = "Alyse is still here, just as hostile as before.";
	text7 = "_Well, what do you have to say?_";
	action = INTRO;
	code = 
		if(get_flag(11,0) == 1)
			remove_string(5);
		else {
		set_flag(11,0,1);
		remove_string(6);
	}
	break;
begintalknode 50;
	state = -1;
	nextstate = 50;
	question = "Ethan";
	text1 = "This middle-aged man is busy sweeping the floor. He's dressed like a priest, but his robe has a lot of dust on it, as well as a few unidentifiable stains. ";
	text2 = "He notices your presence, he just doesn't say anything until he finishes getting the pile of dust he's working on into a corner.";
	text3 = "_Greetings, friends. My name is Ethan._";
	text4 = "_Greetings, friend. My name is Ethan._";
	text5 = "Ethan continues sweeping the floor.";
	text6 = "_Well, what did you want to say?_";
	action = INTRO;
	code = 
		if(party_size() == 1)
			remove_string(3);
		else
		remove_string(4);
		set_flag(11,11,1);
	break;
begintalknode 51;
	state = 50;
	nextstate = -1;
	question = "What's your job here?";
	text1 = "He gestures to the broom.";
	text2 = "_I'm one of the few people around here who's willing to help keep this place clean. I scrub the floors, change out the torches, polish the pews, fix the locks, keep the stairs clear, and wash the windows._";
	text3 = "_Heck, just about the only things I don't do are care for the catacombs and gardens. Thankfully, we've got Felix and Paula for that. Catacombs give me the creeps, and I can't stand dirt,_ he says with a smile.";
	text6 = "Ethan just gestures to the broom again. _You've got a pretty bad memory, don't you? I clean up around here._";
	code = 
		if(get_flag(1,16) == 1) {
			clear_strings();
			add_string(6);
		}
		else {
		remove_string(6);
		set_flag(1,16,1);
	}
	break;
begintalknode 52;
	state = 50;
	nextstate = 51;
	question = "So, are you a priest?";
	text1 = "_Well, yes and no. Not in the sense that I expect you're used to, because I don't do magic. I just try to spread the goodwill of the church, and to keep the cathedral clean._";
	text2 = "He chuckles. _A priest without magic, just faith. How often do you see that nowadays?_";
	text3 = "_I'll tell you what, though. I wish I could cast a few spells, now that these ghosts seem to be here to stay._";
	text5 = "_I thought I told you already. I'm a priest, I just don't do magic._";
	text6 = "He chuckles. _A dying breed, in my mind._";
	code = 
		if(get_flag(1,22) == 0) {
			clear_strings();
			add_string(1);
			if(get_flag(50,0) == 0)
				add_string(2);
			else
			add_string(3);
			set_flag(1,22,1);
		}
		else {
		clear_strings();
		add_string(5);
		if(get_flag(50,0) == 0)
			add_string(6);
	}
	break;
begintalknode 53;
	state = 50;
	nextstate = 52;
	condition = get_flag(1,4) > 0;
	question = "What do you think of the whole ghost problem?";
	text1 = "_Well, as long as they don't get out of hand, I think I'll ride out the storm here. I mean, with as many magic-types as we've got, we should be fine._";
	text2 = "_Of course, if anything attacks me, I'm bolting for the exit. Or the sanctuary, whichever is closer at the time. I trust the winds to protect me, but I don't trust myself to fend off a persistent ghost._";
	text5 = "_Well, I've got to admit that I'm a bit frightened right now. I think we'll be safe in here, but if the ghosts break into the sanctuary, then I'm bolting for the exit, winds help me._";
	text6 = "_I'd just like to know how we got into this mess, really._";
	text7 = "You consider telling him what you know about the ghosts, but you decide that Ethan seems worried enough already.";
	text8 = "Ethan sighs. _Well, for better or worse, they're gone. So on the whole, I view that as an improvement. I'd just like to get everything back to normal._";
	code = 
		if(get_flag(50,0) == 0) {
			remove_string(5);
			remove_string(6);
			remove_string(7);
		}
		else if(get_flag(50,1) == 0) {
		clear_strings();
		add_string(5);
		add_string(6);
		add_string(7);
	}
	else {
clear_strings();
add_string(8);
}
	break;
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = get_flag(1,17) == 1;
	question = "Alyse doesn't seem happy with your work.";
	text2 = "_By the winds, I can't stand her. She's the pickiest priest I've ever had the misfortune to cross paths with. Honestly, if I were you, I'd stay away from her. She's just nasty._";
	text3 = "_But seriously, the reason I don't clean that altar is that I really enjoy annoying Alyse. Don't tell her. Not so much because I'm worried about her getting even more unpleasant, but because it'd spoil the fun._";
	code = 
		set_flag(1,17,2);
	break;
begintalknode 55;
	state = 51;
	nextstate = -1;
	condition = get_flag(1,21) == 0;
	question = "So you can't teach spells or heal people?";
	text1 = "Ethan shrugs.";
	text2 = "_Sorry, but I can't do either of those._";
	code = 
		set_flag(1,21,1);
	break;
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = get_flag(1,17) == 3;
	question = "Alyse knows about your scheme.";
	text1 = "Ethan frowns. _Now why'd you have to go and do that? I was hoping to milk that for another month or two. Now I've got to think up something else..._";
	text2 = "He goes back to sweeping.";
	action = END_TALK;
	code = 
		set_flag(1,17,4);
		if(get_flag(50,0) != 0)
			remove_string(2);
	break;
begintalknode 57;
	state = 51;
	nextstate = -1;
	condition = get_flag(1,23) == 0;
	question = "Don't you have other people to clean the cathedral for you?";
	text1 = "Ethan looks at you in a way that suggests that was a stupid question.";
	text2 = "_Well, no. It's part of our duty to the winds to keep this cathedral clean. And most of us feel like it's our duty to do it ourselves._";
	text3 = "_Of course, some people skip out on helping, because they 'don't want to dirty themselves with the physical'. But if you ask me, I think they're just being lazy. I like it, actually. A little bit of manual labor feels really good every now and then._";
	code = 
		set_flag(1,23,1);
	break;
begintalknode 58;
	state = -1;
	nextstate = 50;
	question = "Ethan";
	text1 = "This middle-aged man seems a bit jittery, but he's doing his best to pray. He's dressed like a priest, but his robe has a lot of dust on it, as well as a few unidentifiable stains. A broom lies on the ground next to him.";
	text2 = "He notices your presence, he just doesn't say anything until he finishes a lengthy passage of what could only be holy text.";
	text3 = "_Greetings, friends. My name is Ethan._";
	text4 = "_Greetings, friend. My name is Ethan._";
	text5 = "Ethan looks just as dirty as before, just a bit more nervous. His broom lies on the ground next to him, and he's busy praying when you approach him. He continues speaking for a few minutes before greeting you again.";
	text6 = "Ethan is still here, silently staring at the stained glass window to the north.";
	action = INTRO;
	code = 
		set_flag(11,11,1);
		if(party_size() == 1)
			remove_string(3);
		else
		remove_string(4);
		if(get_flag(11,1) == 1)
			remove_string(5);
		else {
		set_flag(11,1,1);
		remove_string(6);
	}
	break;
begintalknode 60;
	state = -1;
	nextstate = 60;
	question = "Norbert";
	text1 = "This young-looking man looks like most other priests you've seen, just a little more tense. He's staring north with alarming intensity, almost as if he was trying to ignore you.";
	text2 = "You wait a while, hoping for him to break the uncomfortable silence so that you don't have to. But after a few awkward minutes, you tap him on the shoulder. He yelps.";
	text3 = "_Um... my name is Norbert. What do you want?_";
	text5 = "Norbert is still here, still doing his level best to ignore your presence.";
	action = INTRO;

begintalknode 61;
	state = 60;
	nextstate = 61;
	condition = get_flag(1,24) == 0;
	question = "What are you doing?";
	text1 = "_I'm training to become a full member of the priesthood,_ he says, hesitating to add more.";

begintalknode 62;
	state = 61;
	nextstate = -1;
	question = "How does standing still and doing nothing accomplish that?";
	text1 = "He slouches a bit. _Look, it's all about inner peace. And besides, Brother Silas said that I need to work on it, otherwise I'll be driven insane by the first batch of adventurers to seek my help reviving their stoned friend._";
	text2 = "_But now, Brother Silas is insane, and I can't get another lesson from him until the mages cure him, which means that our magic isn't enough, which makes me wonder why I'm doing this in the first place!_";
	text3 = "He shudders, and tenses up again.";
	text4 = "_It's enough to make me want to take the easy way out... become a sage and retire early._";
	code = 
		set_flag(1,24,1);
	break;
begintalknode 63;
	state = 60;
	nextstate = -1;
	condition = party_size() != 1;
	question = "Can you help us at all?";
	text1 = "Norbert sighs. _I'm just an apprentice, so no. I can't heal you, and I can't teach magic._";
	text5 = "_Look, I already told you, I'm just an apprentice. I can't do anything until I finish my training._";
	code = 
		if((get_flag(1,24) == 1) || (get_flag(1,25) == 1))
			remove_string(1);
		else {
		remove_string(5);
		set_flag(1,25,1);
	}
	break;
begintalknode 64;
	state = 60;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Can you help me at all?";
	text1 = "Norbert sighs. _I'm just an apprentice, so no. I can't heal you, and I can't teach magic._";
	text5 = "_Look, I already told you, I'm just an apprentice. I can't do anything until I finish my training._";
	code = 
		if((get_flag(1,24) == 1) || (get_flag(1,25) == 1))
			remove_string(1);
		else {
		remove_string(5);
		set_flag(1,25,1);
	}
	break;
begintalknode 65;
	state = 60;
	nextstate = -1;
	condition = get_flag(1,4) > 0;
	question = "What do you think about the whole ghost situation?";
	text1 = "_Honestly, I'm kind of worried. So, I plan on staying in here until it's all over, anyway. I figure the safest place has to be the sanctuary, what with Father Richardson and the altars in here._";
	text2 = "_On the plus side, even if the ghosts escape, they probably won't be coming after me. I never did anything to anger them._";
	text3 = "_Well, now that they're gone, I don't really have much of an opinion on it. I'm just glad we're safe._";
	text4 = "_And they never came for me, so I'm glad,_ he adds with a smile.";
	code = 
		if(get_flag(50,1) == 0) {
			clear_strings();
			add_string(1);
			add_string(2);
		}
		else {
		clear_strings();
		add_string(3);
		add_string(4);
	}
	break;
begintalknode 80;
	state = -1;
	nextstate = 80;
	question = "Felix";
	text1 = "Felix sits huddled in the corner, looking just as grimy and disheveled as before. However, his face doesn't show the same degree of concentration, turning his expression into a vacant stare.";
	text2 = "His voice sounds lower and hollow, and his breathing sounds ragged.";
	text3 = "_What do you want from me now?_";
	text5 = "Felix is still huddled down in the corner, breathing irregularly. He doesn't say anything to you.";
	text6 = "Felix is slumped over in the corner, asleep. After all he's been through, you don't have the heart to wake him.";
	action = INTRO;
	code = 
		if(get_flag(50,1) == 0)
			remove_string(6);
		else {
		remove_string(5);
		end();
	}
	break;
begintalknode 81;
	state = 80;
	nextstate = -1;
	question = "Are you okay?";
	text1 = "He shudders. _Yes, I'm fine. I won. The ghosts lost. After you let them escape, they rushed towards me, and..._ he trails off into a coughing fit.";
	text2 = "_I won. I'm still alive. Now get to the point. Why are you bothering me?_";
	text5 = "He begins to shake violently, and he makes a raspy croaking sound. _Just tell me why you're bothering me._";
	code = 
		if(get_flag(11,3) == 1) {
			remove_string(1);
			remove_string(2);
		}
		else {
		remove_string(3);
		set_flag(11,3,1);
	}
	break;
begintalknode 82;
	state = 80;
	nextstate = -1;
	condition = (get_flag(11,4) == 0) && (get_flag(1,4) == 2);
	question = "Father Richardson said you know how to fix the wards.";
	text1 = "Felix grunts, and then his neck starts to spasm. After a few painful seconds, he gets himself under control.";
	text2 = "_Yes, I know how to fix this. It seems that the main suppression field generator was weakened. It's not off. Otherwise, the ghosts would be out. But the machine needs to be readjusted._";
	text3 = "_So we just need a new control crystal. They take at least a week to craft and several weeks to get out here. Thank the winds that there's an extra or two. They should be up in the storage attic._";
	text4 = "_I just can't remember which attic. So you figure it out. But the machine is at the top of the southern spire._";
	text5 = "He starts coughing again. _I hope you got that. I'm not repeating it._";
	code = 
		toggle_quest(6,0);
		toggle_quest(7,1);
		set_flag(11,4,1);
	break;
begintalknode 83;
	state = 80;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Any advice for me?";
	text1 = "_You'll have to disrupt the ghosts. They'll try to keep you from getting there. To the storage attics. And there were definitely mages. They won't let you work on the machine while they're up and moving._";
	text2 = "_Pay most attention to the mages. They'll be able to keep you from operating the machines. And they might corrupt the crystals. So hurry!_";
	text5 = "_Disrupt the ghosts. Take out the mages. Hurry!_";
	code = 
		if(get_flag(11,5) == 1) {
			remove_string(1);
			remove_string(2);
		}
		else {
		set_flag(11,5,1);
		remove_string(5);
	}
	break;
begintalknode 84;
	state = 80;
	nextstate = -1;
	condition = party_size() != 1;
	question = "Any advice for us?";
	text1 = "_You'll have to disrupt the ghosts. They'll try to keep you from getting there. To the storage attics. And there were definitely mages. They won't let you work on the machine while they're up and moving._";
	text2 = "_Pay most attention to the mages. They'll be able to keep you from operating the machines. And they might corrupt the crystals. So hurry!_";
	text5 = "_Disrupt the ghosts. Take out the mages. Hurry!_";
	code = 
		if(get_flag(11,5) == 1) {
			remove_string(1);
			remove_string(2);
		}
		else {
		set_flag(11,5,1);
		remove_string(5);
	}
	break;
begintalknode 90;
	state = -1;
	nextstate = 90;
	question = "Guard";
	text1 = "This guard is blocking the stairway to the next level of the cathedral. He just stares straight forward, not moving a muscle. It's almost as if he doesn't see you.";
	text2 = "He doesn't say anything to you. He just projects the feeling that you shouldn't be bothering him.";
	text5 = "The guard is still here, still blocking the stairway.";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = party_size() != 1;
	question = "Can we get past you?";
	text1 = "_My instructions are to guard this stairwell, and prevent anyone from accessing the third floor. So, no. You may not pass._";
	text2 = "He seems disinclined to continue the conversation.";
	action = END_TALK;

begintalknode 92;
	state = 90;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Can I get past you?";
	text1 = "_My instructions are to guard this stairwell, and prevent anyone from accessing the third floor. So, no. You may not pass._";
	text2 = "He seems disinclined to continue the conversation.";
	action = END_TALK;

begintalknode 110;
	state = -1;
	nextstate = 110;
	question = "Brother Silas";
	text1 = "This elderly priest is crouched down in the corner of the meditation cell, occasionally whimpering. For a while, he doesn't seem to notice you. But after a few moments, he looks up at you.";
	text2 = "Assumedly, this elderly man is the Brother Silas that Father Richardson was talking about. He's crouched down in the corner of the meditation cell, occasionally whimpering. He doesn't notice you at first, but he eventually looks up at you.";
	text3 = "_I am Brother Silas. Who are you? Why are you here?_ he whispers.";
	text4 = "There's something odd about his voice. It sounds hoarse, but it echoes around in your mind for a while. It's a little unnerving.";
	text5 = "Brother Silas is awake again. He's crouched in the corner of the cell, eyes darting wildly about the room.";
	text6 = "Brother Silas crouches in the corner, eyes darting wildly about the room.";
	text7 = "_What's happening? Who are you?_";
	text8 = "The words echo for a few minutes.";
	action = INTRO;
	code = 
		if(get_flag(1,7) == 1)
			remove_string(1);
		else {
		remove_string(2);
		set_flag(1,7,1);
	}
	if(get_flag(3,9) == 0)
		remove_string(5);
	else {
	remove_string(6);
	set_flag(3,9,0);
}
	break;
begintalknode 111;
	state = 110;
	nextstate = 111;
	question = "Who are you?";
	text1 = "He whimpers again. Oddly enough, that sound doesn't echo at all.";
	text2 = "_I am Silas. A priest. Of the church..._ he trails off into silence for a while. _There are ghosts. I... I tried..._";
	text3 = "Again, his voice falters. The echoes are starting to make you uncomfortable.";
	text4 = "_I tried to silence them. They... they had... they broke me. My mind, not... hiding. I am hiding._";
	text5 = "_I... hiding. Ghosts. Must hide._";
	code = 
		if(get_flag(3,4) > 0) {
			clear_strings();
			add_string(5);
		}
		else {
		remove_string(5);
		set_flag(3,4,1);
	}
	break;
begintalknode 112;
	state = 111;
	nextstate = -1;
	condition = get_flag(3,5) == 0;
	question = "What did the ghosts do?";
	text1 = "_They... they broke me. That's all. I don't... don't talk. About it._";
	code = 
		set_flag(3,5,1);
	break;
begintalknode 113;
	state = 110;
	nextstate = 111;
	condition = ((get_flag(1,7) == 0) && (get_flag(50,0) > 0));
	question = "You aren't safe here. (Tell him about the ghosts)";
	text1 = "He sputters. _I know... ghosts. Won't bother me. Done enough harm._";

begintalknode 114;
	state = 110;
	nextstate = -1;
	condition = party_size() != 1;
	question = "Can you help us at all?";
	text1 = "_Can I... help? No. Can't help. Tried to help... no._";
	text2 = "_Want... no. Can't. Need help._";

begintalknode 115;
	state = 110;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Can you help me at all?";
	text1 = "_Can I... help? No. Can't help. Tried to help... no._";
	text2 = "_Want... no. Can't. Need help._";

begintalknode 116;
	state = 110;
	nextstate = -1;
	question = "Do you know anything about the ghosts?";
	text1 = "He shudders, and collapses. For a moment, you think he's dead. Fortunately, he's still breathing. You leave him to sleep.";
	action = END_TALK;
	code = 
		set_flag(3,9,1);
	break;
begintalknode 117;
	state = 110;
	nextstate = -1;
	condition = get_flag(50,1) != 0;
	question = "The ghosts are gone.";
	text1 = "_No... no. Tricks!_";
	text2 = "He collapses to the ground, asleep.";
	action = END_TALK;
	code = 
		set_flag(3,9,1);
	break;
begintalknode 120;
	state = -1;
	nextstate = 120;
	question = "Private Roberts";
	text1 = "You're a little confused when this ghost doesn't attack you. Instead, it cautiously watches you from the corner of the cell.";
	text2 = "_Private Roberts, 35th brigade of the invasion. Please don't attack me._";
	text3 = "Just like the rest of the dead soldiers, Private Roberts looks like he's ready for battle. It's almost funny to watch him cowering like this.";
	text5 = "Private Roberts stands here uneasily.";
	text6 = "_Yes?_";
	text7 = "Private Roberts anxiously shuffles his translucent feet.";
	text8 = "_I hope you've decided to be rational about this now._";
	action = INTRO;
	code = 
		if(get_flag(3,7) == 1) {
			remove_string(5);
			remove_string(6);
			set_flag(3,7,0);
		}
		else {
		remove_string(7);
		remove_string(8);
	}
	break;
begintalknode 121;
	state = 120;
	nextstate = -1;
	question = "Die, undead fiend! (Attack him)";
	text1 = "Roberts backs into the corner of the cell.";
	text2 = "_No! You don't understand! Get away!_";
	text3 = "He melts down through the floor, leaving you alone.";
	action = END_TALK;
	code = 
		erase_char(18);
		play_sound(52);
		set_flag(3,7,1);
		end();
	break;
begintalknode 122;
	state = 120;
	nextstate = 121;
	question = "Who are you?";
	text1 = "_I told you already. Private Roberts, 35th brigade. I don't want to fight anymore._";

begintalknode 123;
	state = 120;
	nextstate = 121;
	question = "Why are you here?";
	text1 = "_Very simple. I don't want to fight anyone anymore. So I'm not helping the others break out._";

begintalknode 124;
	state = 121;
	nextstate = 122;
	condition = get_flag(3,8) == 0;
	question = "Why don't you want to fight?";
	text1 = "_I was a deserter. I got drafted into the army young, then I deserted. This was a little after Hawthorne was killed, and I got caught and court-martialed. By then, they'd stopped sending people to the caves, so I was forced back into the army._";
	text2 = "_The army made sure that one of the captains was watching me at all times, to keep me in line. But that captain didn't get caught in the barrier like me, so he's not around to watch me._";
	text3 = "_I never wanted to fight. I just didn't have a choice until now,_ he says, sounding a little pathetic.";

begintalknode 125;
	state = 122;
	nextstate = -1;
	condition = get_flag(3,8) == 0;
	question = "You're a coward.";
	text1 = "Private Roberts shrinks back against the wall. In fact, part of his body sinks through the wall.";
	text2 = "_Fine. I can live with that. I just don't want to die, and I don't want to hurt anyone._";
	code = 
		set_flag(3,8,1);
	break;
begintalknode 126;
	state = 122;
	nextstate = -1;
	condition = get_flag(3,8) == 0;
	question = "Well, that makes sense.";
	text1 = "Private Roberts relaxes a bit.";
	text2 = "_Thank you. Thank you! You might be the first person to actually see what I'm talking about. I never wanted to hurt anyone. And I definitely didn't want to die... I just wanted to live my life in peace._";
	text3 = "_Thank you. Thank you! You might be the first people to actually see what I'm talking about. I never wanted to hurt anyone. And I definitely didn't want to die... I just wanted to live my life in peace._";
	code = 
		set_flag(3,8,2);
		if(party_size() == 1)
			remove_string(3);
		else
		remove_string(2);
	break;
begintalknode 127;
	state = 120;
	nextstate = -1;
	condition = party_size() != 1;
	question = "Can you help us in any way?";
	text1 = "_No, I can't and I won't. I'm not going to fight them._";

begintalknode 128;
	state = 120;
	nextstate = -1;
	condition = party_size() == 1;
	question = "Can you help me in any way?";
	text1 = "_No, I can't and I won't. I'm not going to fight them._";

begintalknode 129;
	state = 120;
	nextstate = -1;
	condition = get_flag(50,1) == 2;
	question = "Why are you still here?";
	text1 = "_I just don't want to fight anymore, and that's what the others intend to do. So, I'm staying here._";

